{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Importing PulP solver\n",
    "from pulp import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Demand points\n",
    "demand_points=['Port of Salalah', 'Port of Gaza','Port of Jebel Ali']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Port of Salalah', 'Port of Gaza', 'Port of Jebel Ali']"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "demand_points"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Supply Points\n",
    "supply_points=['Port of Santos','Port of Montreal','Port of Vancouver','Port of Shanghai','Port of Marseille','Port of Bandar Abbas','Port of Haifa','Port of Aktau','Port of Busan','Penang Port','Port of Oslo','Port of Vladivostok','Port of Novorossiysk','Port of St. Petersburg','Port of Belgrade','Port of Mersin','Port of Odessa','Port of New York','Port of Los Angeles']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Port of Santos',\n",
       " 'Port of Montreal',\n",
       " 'Port of Vancouver',\n",
       " 'Port of Shanghai',\n",
       " 'Port of Marseille',\n",
       " 'Port of Bandar Abbas',\n",
       " 'Port of Haifa',\n",
       " 'Port of Aktau',\n",
       " 'Port of Busan',\n",
       " 'Penang Port',\n",
       " 'Port of Oslo',\n",
       " 'Port of Vladivostok',\n",
       " 'Port of Novorossiysk',\n",
       " 'Port of St. Petersburg',\n",
       " 'Port of Belgrade',\n",
       " 'Port of Mersin',\n",
       " 'Port of Odessa',\n",
       " 'Port of New York',\n",
       " 'Port of Los Angeles']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "supply_points"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the distances\n",
    "distance = dict(zip(supply_points,[dict(zip(demand_points, [8408,6360,9407])),\n",
    "dict(zip(demand_points, [8471,5165,9470])),\n",
    "dict(zip(demand_points, [10461,10365,10440])),\n",
    "dict(zip(demand_points, [6270,7660,6627])),\n",
    "dict(zip(demand_points, [4081,1631,5080])),\n",
    "dict(zip(demand_points, [943,2922,173])),\n",
    "dict(zip(demand_points, [2367,83,3366])),\n",
    "dict(zip(demand_points, [4147,2301,5094])),\n",
    "dict(zip(demand_points, [6786,8020,7143])),\n",
    "dict(zip(demand_points, [3245,5210,3601])),\n",
    "dict(zip(demand_points, [6675,3831,7673])),\n",
    "dict(zip(demand_points, [7370,8522,7727])),\n",
    "dict(zip(demand_points, [3886,1295,4885])),\n",
    "dict(zip(demand_points, [7533,4545,8532])),\n",
    "dict(zip(demand_points, [4163,1990,5162])),\n",
    "dict(zip(demand_points, [2577,316,3576])),\n",
    "dict(zip(demand_points, [3704,1181,4703])),\n",
    "dict(zip(demand_points, [7930,5196,8918])),\n",
    "dict(zip(demand_points, [11137,9280,11116]))]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': {'Port of Salalah': 8408,\n",
       "  'Port of Gaza': 6360,\n",
       "  'Port of Jebel Ali': 9407},\n",
       " 'Port of Montreal': {'Port of Salalah': 8471,\n",
       "  'Port of Gaza': 5165,\n",
       "  'Port of Jebel Ali': 9470},\n",
       " 'Port of Vancouver': {'Port of Salalah': 10461,\n",
       "  'Port of Gaza': 10365,\n",
       "  'Port of Jebel Ali': 10440},\n",
       " 'Port of Shanghai': {'Port of Salalah': 6270,\n",
       "  'Port of Gaza': 7660,\n",
       "  'Port of Jebel Ali': 6627},\n",
       " 'Port of Marseille': {'Port of Salalah': 4081,\n",
       "  'Port of Gaza': 1631,\n",
       "  'Port of Jebel Ali': 5080},\n",
       " 'Port of Bandar Abbas': {'Port of Salalah': 943,\n",
       "  'Port of Gaza': 2922,\n",
       "  'Port of Jebel Ali': 173},\n",
       " 'Port of Haifa': {'Port of Salalah': 2367,\n",
       "  'Port of Gaza': 83,\n",
       "  'Port of Jebel Ali': 3366},\n",
       " 'Port of Aktau': {'Port of Salalah': 4147,\n",
       "  'Port of Gaza': 2301,\n",
       "  'Port of Jebel Ali': 5094},\n",
       " 'Port of Busan': {'Port of Salalah': 6786,\n",
       "  'Port of Gaza': 8020,\n",
       "  'Port of Jebel Ali': 7143},\n",
       " 'Penang Port': {'Port of Salalah': 3245,\n",
       "  'Port of Gaza': 5210,\n",
       "  'Port of Jebel Ali': 3601},\n",
       " 'Port of Oslo': {'Port of Salalah': 6675,\n",
       "  'Port of Gaza': 3831,\n",
       "  'Port of Jebel Ali': 7673},\n",
       " 'Port of Vladivostok': {'Port of Salalah': 7370,\n",
       "  'Port of Gaza': 8522,\n",
       "  'Port of Jebel Ali': 7727},\n",
       " 'Port of Novorossiysk': {'Port of Salalah': 3886,\n",
       "  'Port of Gaza': 1295,\n",
       "  'Port of Jebel Ali': 4885},\n",
       " 'Port of St. Petersburg': {'Port of Salalah': 7533,\n",
       "  'Port of Gaza': 4545,\n",
       "  'Port of Jebel Ali': 8532},\n",
       " 'Port of Belgrade': {'Port of Salalah': 4163,\n",
       "  'Port of Gaza': 1990,\n",
       "  'Port of Jebel Ali': 5162},\n",
       " 'Port of Mersin': {'Port of Salalah': 2577,\n",
       "  'Port of Gaza': 316,\n",
       "  'Port of Jebel Ali': 3576},\n",
       " 'Port of Odessa': {'Port of Salalah': 3704,\n",
       "  'Port of Gaza': 1181,\n",
       "  'Port of Jebel Ali': 4703},\n",
       " 'Port of New York': {'Port of Salalah': 7930,\n",
       "  'Port of Gaza': 5196,\n",
       "  'Port of Jebel Ali': 8918},\n",
       " 'Port of Los Angeles': {'Port of Salalah': 11137,\n",
       "  'Port of Gaza': 9280,\n",
       "  'Port of Jebel Ali': 11116}}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "distance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Magnesium Demand\n",
    "magnesium_demand=dict(zip(demand_points, [138011676.4,126667931.3,146708282.4]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Salalah': 138011676.4,\n",
       " 'Port of Gaza': 126667931.3,\n",
       " 'Port of Jebel Ali': 146708282.4}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "magnesium_demand"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Magnesium Supply\n",
    "magnesium_supply=dict(zip(supply_points, [4204466.2090,1222172.6320,363811.2924,298590444.7000,2010234.6250,1585983.9250,7566106.3450,6113002.8630,4078244.4230,47579.5177,5189339.4020,9195220.1200,4484984.5940,4536578.4990,379084.0981,3324539.5030,41313949.6100,10124868.6300,7057279.1490])) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': 4204466.209,\n",
       " 'Port of Montreal': 1222172.632,\n",
       " 'Port of Vancouver': 363811.2924,\n",
       " 'Port of Shanghai': 298590444.7,\n",
       " 'Port of Marseille': 2010234.625,\n",
       " 'Port of Bandar Abbas': 1585983.925,\n",
       " 'Port of Haifa': 7566106.345,\n",
       " 'Port of Aktau': 6113002.863,\n",
       " 'Port of Busan': 4078244.423,\n",
       " 'Penang Port': 47579.5177,\n",
       " 'Port of Oslo': 5189339.402,\n",
       " 'Port of Vladivostok': 9195220.12,\n",
       " 'Port of Novorossiysk': 4484984.594,\n",
       " 'Port of St. Petersburg': 4536578.499,\n",
       " 'Port of Belgrade': 379084.0981,\n",
       " 'Port of Mersin': 3324539.503,\n",
       " 'Port of Odessa': 41313949.61,\n",
       " 'Port of New York': 10124868.63,\n",
       " 'Port of Los Angeles': 7057279.149}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "magnesium_supply"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set Problem Variables\n",
    "prob = LpProblem(\"Transportation\", LpMinimize)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "None\n",
       "VARIABLES"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set Problem Variables\n",
    "routes = [(i,j) for i in supply_points for j in demand_points]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('Port of Santos', 'Port of Salalah'),\n",
       " ('Port of Santos', 'Port of Gaza'),\n",
       " ('Port of Santos', 'Port of Jebel Ali'),\n",
       " ('Port of Montreal', 'Port of Salalah'),\n",
       " ('Port of Montreal', 'Port of Gaza'),\n",
       " ('Port of Montreal', 'Port of Jebel Ali'),\n",
       " ('Port of Vancouver', 'Port of Salalah'),\n",
       " ('Port of Vancouver', 'Port of Gaza'),\n",
       " ('Port of Vancouver', 'Port of Jebel Ali'),\n",
       " ('Port of Shanghai', 'Port of Salalah'),\n",
       " ('Port of Shanghai', 'Port of Gaza'),\n",
       " ('Port of Shanghai', 'Port of Jebel Ali'),\n",
       " ('Port of Marseille', 'Port of Salalah'),\n",
       " ('Port of Marseille', 'Port of Gaza'),\n",
       " ('Port of Marseille', 'Port of Jebel Ali'),\n",
       " ('Port of Bandar Abbas', 'Port of Salalah'),\n",
       " ('Port of Bandar Abbas', 'Port of Gaza'),\n",
       " ('Port of Bandar Abbas', 'Port of Jebel Ali'),\n",
       " ('Port of Haifa', 'Port of Salalah'),\n",
       " ('Port of Haifa', 'Port of Gaza'),\n",
       " ('Port of Haifa', 'Port of Jebel Ali'),\n",
       " ('Port of Aktau', 'Port of Salalah'),\n",
       " ('Port of Aktau', 'Port of Gaza'),\n",
       " ('Port of Aktau', 'Port of Jebel Ali'),\n",
       " ('Port of Busan', 'Port of Salalah'),\n",
       " ('Port of Busan', 'Port of Gaza'),\n",
       " ('Port of Busan', 'Port of Jebel Ali'),\n",
       " ('Penang Port', 'Port of Salalah'),\n",
       " ('Penang Port', 'Port of Gaza'),\n",
       " ('Penang Port', 'Port of Jebel Ali'),\n",
       " ('Port of Oslo', 'Port of Salalah'),\n",
       " ('Port of Oslo', 'Port of Gaza'),\n",
       " ('Port of Oslo', 'Port of Jebel Ali'),\n",
       " ('Port of Vladivostok', 'Port of Salalah'),\n",
       " ('Port of Vladivostok', 'Port of Gaza'),\n",
       " ('Port of Vladivostok', 'Port of Jebel Ali'),\n",
       " ('Port of Novorossiysk', 'Port of Salalah'),\n",
       " ('Port of Novorossiysk', 'Port of Gaza'),\n",
       " ('Port of Novorossiysk', 'Port of Jebel Ali'),\n",
       " ('Port of St. Petersburg', 'Port of Salalah'),\n",
       " ('Port of St. Petersburg', 'Port of Gaza'),\n",
       " ('Port of St. Petersburg', 'Port of Jebel Ali'),\n",
       " ('Port of Belgrade', 'Port of Salalah'),\n",
       " ('Port of Belgrade', 'Port of Gaza'),\n",
       " ('Port of Belgrade', 'Port of Jebel Ali'),\n",
       " ('Port of Mersin', 'Port of Salalah'),\n",
       " ('Port of Mersin', 'Port of Gaza'),\n",
       " ('Port of Mersin', 'Port of Jebel Ali'),\n",
       " ('Port of Odessa', 'Port of Salalah'),\n",
       " ('Port of Odessa', 'Port of Gaza'),\n",
       " ('Port of Odessa', 'Port of Jebel Ali'),\n",
       " ('Port of New York', 'Port of Salalah'),\n",
       " ('Port of New York', 'Port of Gaza'),\n",
       " ('Port of New York', 'Port of Jebel Ali'),\n",
       " ('Port of Los Angeles', 'Port of Salalah'),\n",
       " ('Port of Los Angeles', 'Port of Gaza'),\n",
       " ('Port of Los Angeles', 'Port of Jebel Ali')]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "routes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Decision Variables\n",
    "X = LpVariable.dicts(\"ShipmentAmount\",(supply_points, demand_points),0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': {'Port of Salalah': ShipmentAmount_Port_of_Santos_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Santos_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali},\n",
       " 'Port of Montreal': {'Port of Salalah': ShipmentAmount_Port_of_Montreal_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Montreal_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali},\n",
       " 'Port of Vancouver': {'Port of Salalah': ShipmentAmount_Port_of_Vancouver_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Vancouver_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali},\n",
       " 'Port of Shanghai': {'Port of Salalah': ShipmentAmount_Port_of_Shanghai_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Shanghai_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali},\n",
       " 'Port of Marseille': {'Port of Salalah': ShipmentAmount_Port_of_Marseille_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Marseille_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali},\n",
       " 'Port of Bandar Abbas': {'Port of Salalah': ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali},\n",
       " 'Port of Haifa': {'Port of Salalah': ShipmentAmount_Port_of_Haifa_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Haifa_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali},\n",
       " 'Port of Aktau': {'Port of Salalah': ShipmentAmount_Port_of_Aktau_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Aktau_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali},\n",
       " 'Port of Busan': {'Port of Salalah': ShipmentAmount_Port_of_Busan_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Busan_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali},\n",
       " 'Penang Port': {'Port of Salalah': ShipmentAmount_Penang_Port_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Penang_Port_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Penang_Port_Port_of_Jebel_Ali},\n",
       " 'Port of Oslo': {'Port of Salalah': ShipmentAmount_Port_of_Oslo_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Oslo_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali},\n",
       " 'Port of Vladivostok': {'Port of Salalah': ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali},\n",
       " 'Port of Novorossiysk': {'Port of Salalah': ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali},\n",
       " 'Port of St. Petersburg': {'Port of Salalah': ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali},\n",
       " 'Port of Belgrade': {'Port of Salalah': ShipmentAmount_Port_of_Belgrade_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Belgrade_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali},\n",
       " 'Port of Mersin': {'Port of Salalah': ShipmentAmount_Port_of_Mersin_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Mersin_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali},\n",
       " 'Port of Odessa': {'Port of Salalah': ShipmentAmount_Port_of_Odessa_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Odessa_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali},\n",
       " 'Port of New York': {'Port of Salalah': ShipmentAmount_Port_of_New_York_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_New_York_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali},\n",
       " 'Port of Los Angeles': {'Port of Salalah': ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah,\n",
       "  'Port of Gaza': ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali}}"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Objective Function\n",
    "prob += sum(X[i][j]*distance[i][j] for (i,j) in routes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "5210*ShipmentAmount_Penang_Port_Port_of_Gaza + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 3245*ShipmentAmount_Penang_Port_Port_of_Salalah + 2301*ShipmentAmount_Port_of_Aktau_Port_of_Gaza + 5094*ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali + 4147*ShipmentAmount_Port_of_Aktau_Port_of_Salalah + 2922*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza + 173*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali + 943*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah + 1990*ShipmentAmount_Port_of_Belgrade_Port_of_Gaza + 5162*ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali + 4163*ShipmentAmount_Port_of_Belgrade_Port_of_Salalah + 8020*ShipmentAmount_Port_of_Busan_Port_of_Gaza + 7143*ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali + 6786*ShipmentAmount_Port_of_Busan_Port_of_Salalah + 83*ShipmentAmount_Port_of_Haifa_Port_of_Gaza + 3366*ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali + 2367*ShipmentAmount_Port_of_Haifa_Port_of_Salalah + 9280*ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza + 11116*ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali + 11137*ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah + 1631*ShipmentAmount_Port_of_Marseille_Port_of_Gaza + 5080*ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali + 4081*ShipmentAmount_Port_of_Marseille_Port_of_Salalah + 316*ShipmentAmount_Port_of_Mersin_Port_of_Gaza + 3576*ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali + 2577*ShipmentAmount_Port_of_Mersin_Port_of_Salalah + 5165*ShipmentAmount_Port_of_Montreal_Port_of_Gaza + 9470*ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali + 8471*ShipmentAmount_Port_of_Montreal_Port_of_Salalah + 5196*ShipmentAmount_Port_of_New_York_Port_of_Gaza + 8918*ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali + 7930*ShipmentAmount_Port_of_New_York_Port_of_Salalah + 1295*ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza + 4885*ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali + 3886*ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah + 1181*ShipmentAmount_Port_of_Odessa_Port_of_Gaza + 4703*ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali + 3704*ShipmentAmount_Port_of_Odessa_Port_of_Salalah + 3831*ShipmentAmount_Port_of_Oslo_Port_of_Gaza + 7673*ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali + 6675*ShipmentAmount_Port_of_Oslo_Port_of_Salalah + 6360*ShipmentAmount_Port_of_Santos_Port_of_Gaza + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 8408*ShipmentAmount_Port_of_Santos_Port_of_Salalah + 7660*ShipmentAmount_Port_of_Shanghai_Port_of_Gaza + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 6270*ShipmentAmount_Port_of_Shanghai_Port_of_Salalah + 4545*ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza + 8532*ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali + 7533*ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah + 10365*ShipmentAmount_Port_of_Vancouver_Port_of_Gaza + 10440*ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali + 10461*ShipmentAmount_Port_of_Vancouver_Port_of_Salalah + 8522*ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza + 7727*ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali + 7370*ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah + 0\n",
       "VARIABLES\n",
       "ShipmentAmount_Penang_Port_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah Continuous"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "5210*ShipmentAmount_Penang_Port_Port_of_Gaza + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 3245*ShipmentAmount_Penang_Port_Port_of_Salalah + 2301*ShipmentAmount_Port_of_Aktau_Port_of_Gaza + 5094*ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali + 4147*ShipmentAmount_Port_of_Aktau_Port_of_Salalah + 2922*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza + 173*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali + 943*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah + 1990*ShipmentAmount_Port_of_Belgrade_Port_of_Gaza + 5162*ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali + 4163*ShipmentAmount_Port_of_Belgrade_Port_of_Salalah + 8020*ShipmentAmount_Port_of_Busan_Port_of_Gaza + 7143*ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali + 6786*ShipmentAmount_Port_of_Busan_Port_of_Salalah + 83*ShipmentAmount_Port_of_Haifa_Port_of_Gaza + 3366*ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali + 2367*ShipmentAmount_Port_of_Haifa_Port_of_Salalah + 9280*ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza + 11116*ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali + 11137*ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah + 1631*ShipmentAmount_Port_of_Marseille_Port_of_Gaza + 5080*ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali + 4081*ShipmentAmount_Port_of_Marseille_Port_of_Salalah + 316*ShipmentAmount_Port_of_Mersin_Port_of_Gaza + 3576*ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali + 2577*ShipmentAmount_Port_of_Mersin_Port_of_Salalah + 5165*ShipmentAmount_Port_of_Montreal_Port_of_Gaza + 9470*ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali + 8471*ShipmentAmount_Port_of_Montreal_Port_of_Salalah + 5196*ShipmentAmount_Port_of_New_York_Port_of_Gaza + 8918*ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali + 7930*ShipmentAmount_Port_of_New_York_Port_of_Salalah + 1295*ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza + 4885*ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali + 3886*ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah + 1181*ShipmentAmount_Port_of_Odessa_Port_of_Gaza + 4703*ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali + 3704*ShipmentAmount_Port_of_Odessa_Port_of_Salalah + 3831*ShipmentAmount_Port_of_Oslo_Port_of_Gaza + 7673*ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali + 6675*ShipmentAmount_Port_of_Oslo_Port_of_Salalah + 6360*ShipmentAmount_Port_of_Santos_Port_of_Gaza + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 8408*ShipmentAmount_Port_of_Santos_Port_of_Salalah + 7660*ShipmentAmount_Port_of_Shanghai_Port_of_Gaza + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 6270*ShipmentAmount_Port_of_Shanghai_Port_of_Salalah + 4545*ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza + 8532*ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali + 7533*ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah + 10365*ShipmentAmount_Port_of_Vancouver_Port_of_Gaza + 10440*ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali + 10461*ShipmentAmount_Port_of_Vancouver_Port_of_Salalah + 8522*ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza + 7727*ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali + 7370*ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah + 0\n",
       "SUBJECT TO\n",
       "_C1: ShipmentAmount_Penang_Port_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah >= 138011676.4\n",
       "\n",
       "_C2: ShipmentAmount_Penang_Port_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza >= 126667931.3\n",
       "\n",
       "_C3: ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali >= 146708282.4\n",
       "\n",
       "VARIABLES\n",
       "ShipmentAmount_Penang_Port_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah Continuous"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Constraints\n",
    "for j in demand_points:\n",
    "    prob += sum(X[i][j] for i in supply_points) >= magnesium_demand[j]\n",
    "    \n",
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "5210*ShipmentAmount_Penang_Port_Port_of_Gaza + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 3245*ShipmentAmount_Penang_Port_Port_of_Salalah + 2301*ShipmentAmount_Port_of_Aktau_Port_of_Gaza + 5094*ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali + 4147*ShipmentAmount_Port_of_Aktau_Port_of_Salalah + 2922*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza + 173*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali + 943*ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah + 1990*ShipmentAmount_Port_of_Belgrade_Port_of_Gaza + 5162*ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali + 4163*ShipmentAmount_Port_of_Belgrade_Port_of_Salalah + 8020*ShipmentAmount_Port_of_Busan_Port_of_Gaza + 7143*ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali + 6786*ShipmentAmount_Port_of_Busan_Port_of_Salalah + 83*ShipmentAmount_Port_of_Haifa_Port_of_Gaza + 3366*ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali + 2367*ShipmentAmount_Port_of_Haifa_Port_of_Salalah + 9280*ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza + 11116*ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali + 11137*ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah + 1631*ShipmentAmount_Port_of_Marseille_Port_of_Gaza + 5080*ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali + 4081*ShipmentAmount_Port_of_Marseille_Port_of_Salalah + 316*ShipmentAmount_Port_of_Mersin_Port_of_Gaza + 3576*ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali + 2577*ShipmentAmount_Port_of_Mersin_Port_of_Salalah + 5165*ShipmentAmount_Port_of_Montreal_Port_of_Gaza + 9470*ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali + 8471*ShipmentAmount_Port_of_Montreal_Port_of_Salalah + 5196*ShipmentAmount_Port_of_New_York_Port_of_Gaza + 8918*ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali + 7930*ShipmentAmount_Port_of_New_York_Port_of_Salalah + 1295*ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza + 4885*ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali + 3886*ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah + 1181*ShipmentAmount_Port_of_Odessa_Port_of_Gaza + 4703*ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali + 3704*ShipmentAmount_Port_of_Odessa_Port_of_Salalah + 3831*ShipmentAmount_Port_of_Oslo_Port_of_Gaza + 7673*ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali + 6675*ShipmentAmount_Port_of_Oslo_Port_of_Salalah + 6360*ShipmentAmount_Port_of_Santos_Port_of_Gaza + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 8408*ShipmentAmount_Port_of_Santos_Port_of_Salalah + 7660*ShipmentAmount_Port_of_Shanghai_Port_of_Gaza + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 6270*ShipmentAmount_Port_of_Shanghai_Port_of_Salalah + 4545*ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza + 8532*ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali + 7533*ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah + 10365*ShipmentAmount_Port_of_Vancouver_Port_of_Gaza + 10440*ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali + 10461*ShipmentAmount_Port_of_Vancouver_Port_of_Salalah + 8522*ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza + 7727*ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali + 7370*ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah + 0\n",
       "SUBJECT TO\n",
       "_C1: ShipmentAmount_Penang_Port_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Salalah\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah >= 138011676.4\n",
       "\n",
       "_C2: ShipmentAmount_Penang_Port_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza >= 126667931.3\n",
       "\n",
       "_C3: ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali >= 146708282.4\n",
       "\n",
       "_C4: ShipmentAmount_Port_of_Santos_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Salalah = 4204466.209\n",
       "\n",
       "_C5: ShipmentAmount_Port_of_Montreal_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Montreal_Port_of_Salalah = 1222172.632\n",
       "\n",
       "_C6: ShipmentAmount_Port_of_Vancouver_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vancouver_Port_of_Salalah = 363811.2924\n",
       "\n",
       "_C7: ShipmentAmount_Port_of_Shanghai_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Salalah = 298590444.7\n",
       "\n",
       "_C8: ShipmentAmount_Port_of_Marseille_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Marseille_Port_of_Salalah = 2010234.625\n",
       "\n",
       "_C9: ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah = 1585983.925\n",
       "\n",
       "_C10: ShipmentAmount_Port_of_Haifa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Haifa_Port_of_Salalah = 7566106.345\n",
       "\n",
       "_C11: ShipmentAmount_Port_of_Aktau_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Aktau_Port_of_Salalah = 6113002.863\n",
       "\n",
       "_C12: ShipmentAmount_Port_of_Busan_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Busan_Port_of_Salalah = 4078244.423\n",
       "\n",
       "_C13: ShipmentAmount_Penang_Port_Port_of_Gaza\n",
       " + ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Penang_Port_Port_of_Salalah = 47579.5177\n",
       "\n",
       "_C14: ShipmentAmount_Port_of_Oslo_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Oslo_Port_of_Salalah = 5189339.402\n",
       "\n",
       "_C15: ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah = 9195220.12\n",
       "\n",
       "_C16: ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah = 4484984.594\n",
       "\n",
       "_C17: ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah = 4536578.499\n",
       "\n",
       "_C18: ShipmentAmount_Port_of_Belgrade_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Belgrade_Port_of_Salalah = 379084.0981\n",
       "\n",
       "_C19: ShipmentAmount_Port_of_Mersin_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Mersin_Port_of_Salalah = 3324539.503\n",
       "\n",
       "_C20: ShipmentAmount_Port_of_Odessa_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Odessa_Port_of_Salalah = 41313949.61\n",
       "\n",
       "_C21: ShipmentAmount_Port_of_New_York_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_New_York_Port_of_Salalah = 10124868.63\n",
       "\n",
       "_C22: ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah = 7057279.149\n",
       "\n",
       "VARIABLES\n",
       "ShipmentAmount_Penang_Port_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Aktau_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Belgrade_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Busan_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Haifa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Los_Angeles_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Marseille_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Mersin_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Montreal_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_New_York_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Novorossiysk_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Odessa_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Oslo_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_St._Petersburg_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vancouver_Port_of_Salalah Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Vladivostok_Port_of_Salalah Continuous"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Constraints\n",
    "for i in supply_points:\n",
    "    prob += sum(X[i][j] for j in demand_points) == magnesium_supply[i]\n",
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Status: Optimal\n",
      "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali = 47579.518\n",
      "ShipmentAmount_Port_of_Aktau_Port_of_Gaza = 6113002.9\n",
      "ShipmentAmount_Port_of_Bandar_Abbas_Port_of_Jebel_Ali = 1585983.9\n",
      "ShipmentAmount_Port_of_Belgrade_Port_of_Gaza = 379084.1\n",
      "ShipmentAmount_Port_of_Busan_Port_of_Gaza = 4078244.4\n",
      "ShipmentAmount_Port_of_Haifa_Port_of_Gaza = 7566106.3\n",
      "ShipmentAmount_Port_of_Los_Angeles_Port_of_Gaza = 7057279.1\n",
      "ShipmentAmount_Port_of_Marseille_Port_of_Gaza = 2010234.6\n",
      "ShipmentAmount_Port_of_Mersin_Port_of_Gaza = 3324539.5\n",
      "ShipmentAmount_Port_of_Montreal_Port_of_Gaza = 1222172.6\n",
      "ShipmentAmount_Port_of_New_York_Port_of_Gaza = 10124869.0\n",
      "ShipmentAmount_Port_of_Novorossiysk_Port_of_Gaza = 4484984.6\n",
      "ShipmentAmount_Port_of_Odessa_Port_of_Gaza = 41313950.0\n",
      "ShipmentAmount_Port_of_Oslo_Port_of_Gaza = 5189339.4\n",
      "ShipmentAmount_Port_of_Santos_Port_of_Gaza = 4204466.2\n",
      "ShipmentAmount_Port_of_Shanghai_Port_of_Gaza = 15504049.0\n",
      "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali = 145074720.0\n",
      "ShipmentAmount_Port_of_Shanghai_Port_of_Salalah = 138011680.0\n",
      "ShipmentAmount_Port_of_St._Petersburg_Port_of_Gaza = 4536578.5\n",
      "ShipmentAmount_Port_of_Vancouver_Port_of_Gaza = 363811.29\n",
      "ShipmentAmount_Port_of_Vladivostok_Port_of_Gaza = 9195220.1\n",
      "Total kilogram_miles = 2326820082623.368\n"
     ]
    }
   ],
   "source": [
    "prob.solve()\n",
    "\n",
    "print(\"Status:\", LpStatus[prob.status])\n",
    "\n",
    "for v in prob.variables():\n",
    "    if v.varValue > 0:\n",
    "        print(v.name, \"=\", v.varValue)\n",
    "\n",
    "print(\"Total kilogram_miles =\", value(prob.objective))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
